package com.gome.transactiontree.sample.case2;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class Remote2Impl implements Remote2 {

	private static final Logger LOG = LoggerFactory.getLogger(Remote2Impl.class);

	@Override
	public String r2(String txid, String p2) {
		LOG.info("Compensation Remote2Impl.r2({},{})", txid, p2);
		
//		if (true) {
//			throw new RuntimeException("Compensation Remote2Impl.r2 error");
//		}

		return txid;
	}

	@Override
	public void r2_rollback(String txid, String p2) {
		LOG.info("Compensation Remote2Impl.r2_rollback({},{})", txid, p2);
	}
}